<HTML><HEAD><TITLE>pathname(+FilePath, -Path)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Obsolete</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>pathname(+FilePath, -Path)</H1>
Succeeds if the pathname FilePath, if stripped of its file name, gives
Path, the path up to the parent directory of the file.


<DL>
<DT><EM>FilePath</EM></DT>
<DD>String or atom.
</DD>
<DT><EM>Path</EM></DT>
<DD>Variable or string.
</DD>
</DL>
<H3>This built-in predicate is obsolete!</H3>
<H2>Description</H2>
   Used to check if the pathname FilePath, when stripped of its file name,
   unifies with Path, the path up to the parent directory of the file.
   pathname(File, Path) is equal to pathname(File, Path, _).

<P>

<H3>Modes and Determinism</H3><UL>
<LI>pathname(+, -) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>FilePath is not instantiated.
<DT><EM>(5) type error </EM>
<DD>FilePath is not a string or atom.
<DT><EM>(5) type error </EM>
<DD>Path is neither a string nor a variable.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      [eclipse]: pathname("/home/user/userfile", P).
      P = "/home/user/"
      yes.

      pathname("/home/user","/home/").
      pathname("/home/","/home/").
      pathname("/home","/").
      pathname("/","/").

Fail:
      pathname("/home/","/").

Error:
      pathname(F,P).                   (Error 4).
      pathname('/home/user/',P).       (Error 5).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/opsys/pathname-4.html">pathname / 4</A>, <A HREF="../../kernel/opsys/pathname-3.html">pathname / 3</A>, <A HREF="../../kernel/obsolete/suffix-2.html">suffix / 2</A>
</BODY></HTML>
